/**
 * Project Name:umale-maintenance
 * File Name:ReturnData
 * Package Name:com.xuhaowei.mvc.jpa.common
 * Date: 2020/3/14 下午1:31
 * Copyright (c) 2018, Neoglory-umale All Rights Reserved.
 */
package com.xuhaowei.mvc.jpa.common;

import java.io.Serializable;

/**
 * @ClassName ReturnData
 * @Description TODO
 * @Author xuhaowei
 * @Date 2020/3/14 下午1:31
 * @Version 1.0.0
 * @since JDK 1.8
 */
public class ReturnData<T> implements Serializable {

    private static final long serialVersionUID = 62396924885831049L;
    private Integer code;
    private String msg;

    private T data;

    public ReturnData(int code, String message, T data) {
        this.code = code;
        this.msg = message;
        if (data != null) {
            this.data = data;
        }
    }

    public ReturnData(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}